package com.cy.pj.sys.dao;

import com.cy.pj.sys.pojo.SysGoodsType;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface SysTypeDao {

    List<SysGoodsType> doFindType(String typeName);

    @Insert("INSERT INTO goods_type (goods_type_name) value (#{typeName})")
    Integer insertObject(String typeName);

    SysGoodsType selectByName(String typeName);

    SysGoodsType findObjectById(Integer id);

    @Update("update goods_type set goods_type_name=#{typeName} where goods_type_id=#{id}")
    void updateObject(SysGoodsType sysGoodsType);
}
